#include <iostream>

void swap(int &a,int &b)
{
    int temp = a;
    a = b;
    b = temp;
}


int main()
{
    int b = 10;
    int c = 20;

    int &a = b;
    int &d = c;

    std::cout<<b<<std::endl;
    std::cout<<c<<std::endl;

    swap(a,d);
    std::cout<<b<<std::endl;
    std::cout<<c<<std::endl;

}